x=randi(6,100,4);
x=sort(x,2);
x=x(:,1:3);
hist(sum(x,2),3:18)